package com.weng.platform.apiManager.doc.model.vo;

import com.weng.framework.common.model.component.tree.TreeNode;
import com.weng.framework.common.model.component.tree.TreeNodeConverter;
import com.weng.platform.apiManager.doc.entity.Catalog;
import lombok.Data;



 /**
 * api分类树表
 * @author wengzhonghui
 * @date 2020-09-26 23:44:05
 */
@Data
public class CatalogTreeNode extends TreeNode implements TreeNodeConverter<Catalog, CatalogTreeNode> {

    private String id;
    private String name;
    private String code;
	 private String projectId;
    private int position;
    private String sourcesName;
    private String remark;
	
    @Override
    public CatalogTreeNode convert(Catalog t) {
        CatalogTreeNode node = new CatalogTreeNode();
        // tree node
        node.setKey(t.getId());
				node.setLabel(t.getName());
        node.setParentId(t.getParentId());

        // property
        node.setId(t.getId());
        node.setName(t.getName());
        node.setProjectId(t.getProjectId());
        node.setPosition(t.getPosition());
        return node;
    }

}
